<template>
	<view class="pages">
		<my-header bgColor="bg-gradual-blue" :isBack="false" >
			<block slot="backText">返回</block>
			<block slot="content">每日一笑</block>
		</my-header>
		<view class="joke_list">
		<view class="content padding">{{jokeList[0].content}}</view>

			<block v-for="(item,index) in jokeList" :key="index">
				
			<!-- <view class="item">{{item.content}}</view> -->
			</block>
		</view>
		<view class="go" @click="go()">去卡片</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
                jokeList:[]
			}
		},
		onLoad() {
			this.initData()
		},
		onShow(){
		},
		methods: {
			async initData(){
				let res=await uni.$request({},"/api/joke")
				console.log(res);
				if (res.code==200) {
					this.jokeList=res.data
				}
			},
			go(){
				console.log(111111);
				uni.navigateTo({
					 url: './tantan/index',
					 fal:err=>{
						 console.log(err);
					 }
				})
			}
            
		}
	}
</script>

<style lang="scss">
	.joke_list{
		.content{
			width: 600rpx;
			height: 600rpx;
			background: #fff;
		}
	}
</style>